<%-- 
    Document   : NicholascreateDocument
    Created on : Apr 19, 2011, 1:26:17 PM
    Author     : ChuckToh
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<h3>Create New Document</h3>
<c:choose>
    <c:when test="${!empty afterNewDocumentMessage}">
        <c:out value="${afterNewDocumentMessage}" escapeXml="false"></c:out>
        <c:remove var="afterNewDocumentMessage" scope="session"></c:remove>
        <font size="-1"><br/><br/>Please refresh the page to create new document.</font>
        </c:when>

    <c:otherwise>
        <form action="../processNewDocument" method="post">
            <table cellspacing="5" cellpadding="5">
                <tr>
                    <th align="left" valign="top">Category</th>
                    <td align="left" valign="top"><input type="text" name="category"></td>
                </tr>

                <tr>
                    <th align="left" valign="top">Title</th>
                    <td align="left" valign="top"><input type="text" name="title"></td>
                </tr>

                <tr>
                    <th align="left" valign="top">Content</th>
                    <td align="left" valign="top"><textarea cols="100" rows="10"  name="content"></textarea></td>
                </tr>

                <tr>
                    <td align="right" colspan="2">
                        <input type="submit" value="Submit">&nbsp;&nbsp;
                        <input type="reset" value="Clear">
                    </td>
                </tr>
            </table>
        </form>
    </c:otherwise>
</c:choose>